/* 实现一个计数累加 */
var canvas;
var txt;
var stage;
var count = 0;
window.onload = function(){
    canvas = document.getElementById("canvas");
    stage = new createjs.Stage(canvas);
    txt = new createjs.Text("number->","20px Arial","#ff0000")
    stage.addChild(txt);
    createjs.Ticker.setFPS(30);//canvas官网可以简单了解一下
    /* 设置监听 */
    createjs.Ticker.addEventListener("tick",tick)
}
function tick(e){
    count++;
    txt.text = "number->"+count;
    stage.update();//更新
}